include(global.pri)

###########################################################
# INSTALL bin path
###########################################################
target.path            = $${CYG_INSTALL_PREFIX}/bin
INSTALLS              += target

###########################################################
# POST build default copy
###########################################################
unix:PRO_BIN_FILE      = $${OUT_PWD}/$${TARGET}$${DEBUG_POSTFIX}
win32:PRO_BIN_FILE     = $${OUT_PWD}/$${CYG_TYPE}/$${TARGET}$${DEBUG_POSTFIX}.exe

PRO_BIN_PATH           = $$CYG_BIN_PATH
win32 {
    PRO_BIN_FILE       = $$replace(PRO_BIN_FILE, /, \\)
    PRO_BIN_PATH       = $$replace(PRO_BIN_PATH, /, \\)
}

win32:mkdir_bin        = (if not exist $$PRO_BIN_PATH $${QMAKE_MKDIR} $$PRO_BIN_PATH)
unix:mkdir_bin         = $${QMAKE_MKDIR} $$PRO_BIN_PATH

copy_bins              = $${QMAKE_COPY_FILE} $${PRO_BIN_FILE} $$PRO_BIN_PATH

win32:QMAKE_POST_LINK += $$mkdir_bin && $$copy_bins
unix:QMAKE_POST_LINK  += $$mkdir_bin ; $$copy_bins
